package cl.ccs.migracionbcmc.util;


import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;

//import org.apache.log4j.Logger;


public final class SMTPAuthenticator extends Authenticator {
  //  static Logger logger = Logger.getLogger(SMTPAuthenticator.class);
    
    private String user;
    private String pass;

    public SMTPAuthenticator(String user, String pass) {
        super();
        this.user = user;
        this.pass = pass;
    }

    protected PasswordAuthentication getPasswordAuthentication() {
  //      logger.info("PasswordAuthentication.getPasswordAuthentication:-->Inicio");
        PasswordAuthentication pa = new PasswordAuthentication(user, pass);
  //      logger.info("PasswordAuthentication.getPasswordAuthentication:-->Fin");
        return pa;
    }
}
